/**
 * Callback method for when form is shown.
 *
 * @param {Boolean} firstShow form is shown first time after load
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"EE84B43E-4438-41DD-9A2D-38CCDCBE7C41"}
 */
function onShow(firstShow, event) 
{
	databaseManager.setAutoSave(false);
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"3524A611-40C3-4C37-835D-8052C92484C5"}
 */
function onDataChange_unidad(oldValue, newValue, event) 
{
	if(unidad==null && unidad==0)
	{
		globals.gMensaje ='Debe informar unidad '
		globals.DIALOGS.showInfoDialog('Productos',  globals.gMensaje,  "OK") // 23/01/2014
	}
	return true
}

/**
 * Handle changed data.
 *
 * @param {Object} oldValue old value
 * @param {Object} newValue new value
 * @param {JSEvent} event the event that triggered the action
 *
 * @returns {Boolean}
 *
 * @properties={typeid:24,uuid:"1F8D890E-5CA4-4A0A-8416-31FF5E80F24B"}
 */
function onDataChange_cod_producto(oldValue, newValue, event) 
{
	if (globals.gEstadoAbm != 1)
		return false;
	else
		return true;
		
}
